package com.tengju.data.infrastructure.persistence.mybatis.mapper.data.custom;

import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 周维度-绩效目标指标
 */
public interface ReportPerformanceIndexDdWMapper {

    List<Map<String,Object>> getKaAllTarget(@Param("weekStart") String weekStart,
                                            @Param("weekEnd") String weekEnd,
                                            @Param("genSecIdCodeList") List<Long> genSecIdCodeList);

    LocalDateTime getUpdateTime(@Param("weekStart") String weekStart,
                                @Param("weekEnd") String weekEnd,
                                @Param("genSecIdCodeList") List<Long> genSecIdCodeList);

    List<Map<String,Object>> getSecAllTargetTable(@Param("weekStart") String weekStart,
                                                  @Param("weekEnd") String weekEnd,
                                                  @Param("genSecIdCodeList") List<Long> genSecIdCodeList,
                                                  @Param("orderColumn") String orderColumn,
                                                  @Param("orderType") String orderType,
                                                  @Param("offset") Integer offset,
                                                  @Param("limit") Integer limit);

    List<Map<String,Object>> getSecStarAllTargetTable(@Param("weekStart") String weekStart,
                                                      @Param("weekEnd") String weekEnd,
                                                      @Param("idCode") Long idCode,
                                                      @Param("genSecIdCodeList") List<Long> genSecIdCodeList,
                                                      @Param("superIdCode") Long superIdCode,
                                                      @Param("orderColumn") String orderColumn,
                                                      @Param("orderType") String orderType,
                                                      @Param("offset") Integer offset,
                                                      @Param("limit") Integer limit);

    Integer getSecAllTargetTableTotal(@Param("weekStart") String weekStart,
                                      @Param("weekEnd") String weekEnd,
                                      @Param("genSecIdCodeList") List<Long> genSecIdCodeList);

    Integer getSecStarAllTargetTableTotal(@Param("weekStart") String weekStart,
                                          @Param("weekEnd") String weekEnd,
                                          @Param("idCode") Long idCode,
                                          @Param("genSecIdCodeList") List<Long> genSecIdCodeList,
                                          @Param("superIdCode") Long superIdCode);

    List<Map<String, Object>> getSecPerformance(@Param("genSecIdCodes") List<Long> genSecIdCodes,
                                                @Param("startDate") LocalDate startDate);

    List<Map<String, Object>> getTopSecPerformanceDay(@Param("genSecIdCodes") List<Long> genSecIdCodeVals, @Param("startDate") LocalDate startDate);

}
